//// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
//package com.linqingying.gitcode.pullrequest.ui.filters
//
//import com.intellij.openapi.components.*
//import kotlinx.serialization.Serializable
//
//@Service(Service.Level.PROJECT)
//@State(name = "GitCodePullRequestSearchHistory", storages = [Storage(StoragePathMacros.WORKSPACE_FILE)], reportStatistic = false)
//internal class GCPRListPersistentSearchHistory : SerializablePersistentStateComponent<GCPRListPersistentSearchHistory.HistoryState>(
//  HistoryState()) {
//
//  @Serializable
//  data class HistoryState(val history: List<GCPRListSearchValue> = emptyList(), val lastFilter: GCPRListSearchValue? = null)
//
//  var lastFilter: GCPRListSearchValue?
//    get() = state.lastFilter
//    set(value) {
//      updateState {
//        it.copy(lastFilter = value)
//      }
//    }
//
//  var history: List<GCPRListSearchValue>
//    get() = state.history.toList()
//    set(value) {
//      updateState {
//        it.copy(history = value)
//      }
//    }
//}
